﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;

public class UNetworkManager
{
    public NetworkManager networkManager;
    public bool isServer;
    
    public void StartHost() {
        networkManager.StartHost();
        isServer = true;
    }

    public void ConnectServer()
    {
        networkManager.StartClient(null, null);
        isServer = false;
    }

    public void Quit()
    {
        if (isServer) {
            networkManager.StopHost();
        } else {
            networkManager.StopClient();
        }
    }
}
